const state = {
  name: "",
  avatar: "",
};
const mutations = {
  set_name(state, name) {
    state.name = name;
  },
  set_avatar(state, avatar) {
    state.avatar = avatar;
  },
};
const actions = {
  getUserInfo({ commit }, { name, avatar }) {
    commit("set_name", name);
    commit("set_avatar", avatar);
  },
};
export default {
  namespaced: true,
  state,
  mutations,
  actions,
};
